# Maintainer: Cían Hughes <Ci@nHugh.es>
pkgname=knxd
pkgver=0.14.61
pkgrel=0
pkgdesc="Knxd is an advanced KNX router/gateway; it can talk to all known KNX interfaces"
arch="all"
url="https://github.com/knxd/knxd"
license="GPL-2.0-only"
makedepends="
	argp-standalone
	autoconf
	automake
	bsd-compat-headers
	fmt-dev
	libev-dev
	libtool
	libusb-dev
	linux-headers
	m4
	"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/knxd/knxd/tar.gz/$pkgver"
options="!check" # no tests

prepare() {
	default_prepare

	printf "#!/bin/sh\n\necho %s" "$pkgver" > ./tools/version.sh
	sh ./bootstrap.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-systemd
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
40b4b0d2e3730a148863253d17ee413cc6897c1e7289f93635582fa137db58cbbf05bab7807f6a8af017a6dbd02b74aa3f4ed9f9f4567f9f011aef78e315faf1  knxd-0.14.61.tar.gz
"
